import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
 {
   path:'/login',
   name:'login',
   component: () => import('@/views/login')
 },
 {
  path:'/',
  component: () => import('@/views/layout/index'),
  children:[
    {
      path:'/',
      name:'home',
      component: () => import('@/views/layout/home/home'),
    },
    {
      path:'/question',
      name:'question',
      component: () => import('@/views/layout/question/question'),
    },
    {
      path:'/video',
      name:'video',
      component: () => import('@/views/layout/video/video'),
    },
    {
      path:'/my',
      name:'my',
      component: () => import('@/views/layout/my/my'),
    }
  ]
 }
]

const router = new VueRouter({
  routes
})

export default router
